@import '@snack-uikit/figma-tokens/build/scss/components/styles-tokens-element';
@import '@snack-uikit/figma-tokens/build/scss/components/styles-tokens-toolbar';

.toolbar {
  box-sizing: border-box;
}

.container {
  @include composite-var($toolbar-container);

  position: relative;

  display: flex;
  justify-content: space-between;

  box-sizing: border-box;

  background-color: $sys-neutral-background1-level;

  &[data-outline] {
    &::before {
      @include composite-var($toolbar-container-outline);

      pointer-events: none;
      content: '';

      position: absolute;
      top: 0;
      left: 0;

      box-sizing: border-box;
      width: 100%;
      height: 100%;

      border-color: $sys-neutral-decor-default;
      border-style: solid;
    }
  }

}

.search {
  @include composite-var($toolbar-search);  

  &:focus-within {
    @include outline-var($container-focused-s);

    position: relative;
    outline-color: $sys-available-complementary;
  }
}

.updateButton {
  svg {
    transform: rotate(360deg);
    transition: transform 0.5s;
  }

  &:active {
    svg {
      transform: rotate(0deg);
      transition-duration: 0s;
    }
  }
}

.flexRow {
  display: flex;
  flex-shrink: 0;
  box-sizing: border-box;

  &[data-align-right] {
    margin-left: auto;
  }
}

.actions {
  flex-shrink: 0;
  box-sizing: border-box;
}
